import * as types from '../actionTypes/loginTypes';
const userToken = '';

const login = (state = userToken, action) => {
  switch (action.type) {
    case types.LOGIN_SETTOKEN:
      return action.payload;
    case types.LOGOUT_CLEANTOKEN:
      return userToken;
    default:
      return state;
  }
};

export default login;
